<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>审核失败原因</title>
<%@ include file="/view/common/tags.jsp"%>
<link rel="stylesheet" href="${sysManagerV1}/js/kindeditor/themes/default/default.css" type="text/css"/>
</head>
<body>
	<div class="well well_p" >
		<sk:form method="post" cssClass="form-horizontal" action="" id="saveAndUpdateFrom" target="_parent"  enctype="multipart/form-data">
			<div class="form-group">
				<label class="col-xs-2 text-right">原因:</label>
				<div class="col-xs-5">
					<sk:select cssClass="form-control select" name="auditReasonId" id="auditReasonId" value="" requiredInit="true" ajaxURL="${tradeV1}/tradeGoodsAudit/auditGoodsReasonsSelect?wm[USE_FLAG]=1">
                        <option value="">请选择</option>
                    </sk:select>
                    <input type="hidden" name="auditReasonDes" id="auditReasonDes" value=""/>
				</div>
			</div>
 			<input type="hidden" id="rowId" name="rowId" value="<%=request.getParameter("rowId")%>">
           	<input type="hidden" id="token" name="token" value="">
           	<input type="hidden" id="updateFlag" name="updateFlag" value="<%=request.getParameter("updateFlag")%>">
           	<input type="hidden" id="isReCommit" value="0">
		</sk:form>	
	</div>
</body>
<%@ include file="/view/common/footer.jsp"%>
<script type="text/javascript" charset="UTF-8" src="${sysManagerV1}/js/kindeditor/kindeditor-min.js"></script>
<script type="text/javascript" charset="gbk" src="${sysManagerV1}/js/kindeditor/lang/zh_CN.js"></script>
<script type="text/javascript">

$(function(){
	$("#token").val(sessionStorage.getItem("token"));
})

function add(){
    $("#auditReasonDes").val($('#auditReasonId').find("option:selected").text());

    $.ajax({
        url: "${tradeV1}/tradeGoodsAudit/auditGoods",
        type: "post",
        cache: false,
        data: new FormData($("#saveAndUpdateFrom")[0]),
        dataType:"json",
        processData: false,
        contentType: false,
        async:false,
        success: function(data) {
            if(data == 1){
                parent.layer.msg("操作成功！");
            } else if(data == 0){
                parent.layer.msg("操作失败！");
            }
            if(data >= 0){
                parent.findData();
                parent.layer.close(parent.tableIndex);
            }
        }
    });
}
</script>
</html>